Some conventional graphics processing systems include a binning engine and a rendering engine. The binning engine classifies associated geometries of drawing commands for an image frame that includes a number of tiles. More specifically, the binning engine determines which tiles are touched by each geometry and stores the drawing command for each geometry touching the tile in a respective memory bin corresponding to the tile.
The rendering engine accesses the drawing commands from the memory bins to render an image for display. More specifically, the rendering engine retrieves drawing commands from each memory bin to render the relevant portion of an image within the respective tile of a frame. When rendering the image, the rendering engine initializes a pixel depth buffer (or z buffer) to an initial value representing a pixel depth value (or z value) at the back (or near) clipping plane. The rendering engine also initializes a color buffer to a value (e.g., zero) representing the background color of the image. The rendering engine compares a previous pixel depth value (e.g., zero when first initialized) stored in the pixel depth buffer against a current pixel depth value. If the current pixel is behind the previous pixel in the pixel depth buffer, the pixel is rejected, otherwise the pixel is shaded, the pixel color is written to a color buffer and the current pixel depth value replaces the previous pixel depth value in the pixel depth buffer.
In one method, the rendering engine can discard a pixel as soon as the pixel depth is known, which makes it possible to skip the additional rendering processes (e.g., shading, lighting, and texturing) for a pixel that would not be visible. However, if the geometry is drawn from back to front, no pixels can be discarded because all of the pixels will pass the pixel depth test.
In another method, the rendering engine compares current pixel depth values to previous pixel depth values and populates the pixel depth buffer based thereon. The drawing commands are then stored one at a time in a first in first out (FIFO) buffer in order to delay the rendering. While the drawing commands are in the FIFO buffer, the rendering engine receives additional drawing commands and updates the pixel depth buffer based thereon. Once the FIFO buffer is full, the rendering engine compares the pixel depth values of the drawing commands in the FIFO buffer to the pixel depth values in the pixel depth buffer to determine which pixels are visible. The rendering engine then renders the drawing commands that have visible pixels from the FIFO buffer. Although this method works, it requires additional processing resources and delays the drawing commands to be rendered, which increases rendering time.
Accordingly, there is a need to reduce processing resources and time required to process drawing commands to render an image.